-
Notifications
You must be signed in to change notification settings - Fork 507
Support Mill 1 #3726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Mill 1 #3726
Conversation
buildRootDir / s".$millVersionName", | ||
buildRootDir / ".config" / millVersionName | ||
).collectFirstSomeM(fileAlg.readFile).map(_.flatMap(parser.parseMillVersion)) | ||
val fromBuildFile = List(buildRootDir / "build.mill", buildRootDir / "build.mill.scala") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.sc
is missing here. Also build.mill.yaml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build.sc
is not here since it doesn't have a yaml header to parse.
I'm going to add build.mill.yaml
. But, is it already supported? Maybe can be added in a follow up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I wasn't aware build.sc
does not support a YAML header. I think that's nowhere documented. build.mill.yaml
is supported in Mill main
and snapshot releases, but has a slightly different format (pure YAML without the comment-prefix), so no need to add it right now. I was just mentioning it for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked, Mill does read YAML-headers from build.sc
files. We should also add support for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Maybe, the extra empty lead line in the YAML frontmatter tests is superfluous.
modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillVersionParserTest.scala
Outdated
Show resolved
Hide resolved
modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillVersionParserTest.scala
Outdated
Show resolved
Hide resolved
modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillVersionParserTest.scala
Outdated
Show resolved
Hide resolved
@mzuehlke Could you please approve the CI workflow for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MillAlgTest needs fix:
==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, version < 0.11 0.04s munit.ComparisonFailException: modules/core/src/test/scala/org/scalasteward/core/buildtool/mill/MillAlgTest.scala:32
31: )
32: assertEquals(state, expected)
33: }
values are not the same
=> Diff (- expected, + obtained)
"read",
- "/tmp/scala-steward/workspace/lihaoyi/fastparse/.mill-version"
+ "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill"
)
"read",
- "/tmp/scala-steward/workspace/lihaoyi/fastparse/.config/mill-version"
+ "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.mill.scala"
)
cmd = List(
+ "read",
+ "/tmp/scala-steward/workspace/lihaoyi/fastparse/build.sc"
+ )
+ ),
+ Cmd(
+ cmd = List(
"write",
at munit.FunSuite.assertEquals(FunSuite.scala:13)
at org.scalasteward.core.buildtool.mill.MillAlgTest.$anonfun$new$1(MillAlgTest.scala:32)
==> X org.scalasteward.core.buildtool.mill.MillAlgTest.getDependencies, 0.11 <= version < 0.12 0.004s org.scalasteward.core.buildtool.mill.parser$CirceParseError: Failed to decode Modules
at org.scalasteward.core.buildtool.mill.parser$.$anonfun$parseModules$1(parser.scala:43)
at cats.syntax.EitherOps$.leftMap$extension(either.scala:193)
at org.scalasteward.core.buildtool.mill.parser$.parseModules(parser.scala:43)
at org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:85)
at cats.data.Kleisli.$anonfun$flatMap$4(Kleisli.scala:75)
at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.readResource(FileAlg.scala:111)
at get @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$2(MockProcessAlg.scala:15)
at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
at flatMap @ org.scalasteward.core.mock.package$.getFlatMapSet(package.scala:32)
at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$14(MockProcessAlg.scala:37)
at map @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
at flatMap @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$7(MockProcessAlg.scala:23)
at set @ org.scalasteward.core.io.MockProcessAlg$.$anonfun$create$6(MockProcessAlg.scala:22)
Caused by: ParsingFailure: exhausted input
@exoego Can you approve the workflow again? I fixed the test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3726 +/- ##
==========================================
+ Coverage 89.77% 89.80% +0.02%
==========================================
Files 174 174
Lines 5055 5069 +14
Branches 447 493 +46
==========================================
+ Hits 4538 4552 +14
Misses 517 517 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.